
<%@ page import="projetjee.User" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'user.label', default: 'User')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
		<style type="text/css" media="screen">
			#status {
				background-color: #eee;
				border: .2em solid #720A0A;
				margin: 2em 2em 1em;
				padding: 1em;
				width: 12em;
				float: right;
				-moz-box-shadow: 0px 0px 1.25em #ccc;
				-webkit-box-shadow: 0px 0px 1.25em #ccc;
				box-shadow: 0px 0px 1.25em #ccc;
				-moz-border-radius: 0.6em;
				-webkit-border-radius: 0.6em;
				border-radius: 0.6em;
			}
			.ie6 #status {
				display: inline;
				/* float double margin fix http://www.positioniseverything.net/explorer/doubled-margin.html */
			}
			
			#status ul {
				font-size: 0.9em;
				list-style-type: none;
				margin-bottom: 0.6em;
				padding: 0;
			}
			
			#status li {
				line-height: 1.3;
			}
			
			#status h1 {
				text-transform: uppercase;
				font-size: 1.1em;
				margin: 0 0 0.3em;
			}
			
			#page-body {
				margin: 2em 1em 1.25em 18em;
			}
			
			h2 {
				margin-top: 1em;
				margin-bottom: 0.3em;
				font-size: 1em;
			}
			
			p {
				line-height: 1.5;
				margin: 0.25em 0;
			}
			
			#controller-list ul {
				list-style-position: inside;
			}
			
			#controller-list li {
				line-height: 1.3;
				list-style-position: inside;
				margin: 0.25em 0;
			}
			
			@media screen and (max-width: 480px) {
				#status {
					display: none;
				}
				#page-body {
					margin: 0 1em 1em;
				}
				#page-body h1 {
					margin-top: 0;
				}
			}
		</style>
	</head>
	<body>
		<p style="float: right;">
			<g:link controller='logout'>Se déconnecter </g:link>
		</p>
		<a href="#show-user" class="skip" tabindex="-1">
			<g:message code="default.link.skip.label" default="Skip to content&hellip;"/>
		</a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<%--<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>--%>
			</ul>
		</div>
		<div id="show-user" align="left" class="content scaffold-show" role="main">
			<h1>
				Profil: <g:fieldValue bean="${userInstance}" field="username"/>
				<%--<g:message code="default.show.label" args="[entityName]" />--%>
			</h1>
		</div>
		<div id="status" > 
			<g:if test="${userInstance?.photoProfil}">
				<img class="Photo" src="${createLink(controller: 'user', action:'viewImage', id:userInstance.id)}" width="200"/>	
			</g:if>
		</div>
		<div id="show-user" align="left" class="content scaffold-show" role="main">
			<g:if test="${flash.message}">
				<div class="message" role="status">${flash.message}</div>
			</g:if>
			<%--<ol>
				<g:if test="${userInstance?.photoProfil}">
					<li class="fieldcontain">
						<span id="photoProfil-label" class="property-label">
							<g:message code="user.photoProfil.label" default="Photo Profil" />
							<img class="Photo" src="${createLink(controller: 'user', action:'viewImage', id:userInstance.id)}"/>
						</span>
						
					</li>
				</g:if>
			</ol>--%>
			
			<ol class="property-list user">
				<g:if test="${userInstance?.username}">
					<li class="fieldcontain">
						<span id="username-label" class="property-label">
							<g:message code="user.username.label" default="Username" />
						</span>
						<span class="property-value" aria-labelledby="username-label">
							<g:fieldValue bean="${userInstance}" field="username"/>
						</span>
					</li>
				</g:if>
			
				<%--<g:if test="${userInstance?.password}">
					<li class="fieldcontain">
						<span id="password-label" class="property-label"><g:message code="user.password.label" default="Password" /></span>
						<span class="property-value" aria-labelledby="password-label">
							<g:fieldValue bean="${userInstance}" field="password"/>
						</span>
					</li>
				</g:if>--%>
				
				<g:if test="${userInstance?.nom}">
				<li class="fieldcontain">
					<span id="nom-label" class="property-label">
						<g:message code="user.nom.label" default="Nom" />
					</span>
					<span class="property-value" aria-labelledby="nom-label"><g:fieldValue bean="${userInstance}" field="nom"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${userInstance?.prenom}">
				<li class="fieldcontain">
					<span id="prenom-label" class="property-label"><g:message code="user.prenom.label" default="Prenom" /></span>
					
						<span class="property-value" aria-labelledby="prenom-label"><g:fieldValue bean="${userInstance}" field="prenom"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${userInstance?.mail}">
				<li class="fieldcontain">
					<span id="mail-label" class="property-label"><g:message code="user.mail.label" default="Mail" /></span>
					
						<span class="property-value" aria-labelledby="mail-label"><g:fieldValue bean="${userInstance}" field="mail"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${userInstance?.sexe}">
				<li class="fieldcontain">
					<span id="sexe-label" class="property-label"><g:message code="user.sexe.label" default="Sexe" /></span>
					
						<span class="property-value" aria-labelledby="sexe-label"><g:fieldValue bean="${userInstance}" field="sexe"/></span>
					
				</li>
				</g:if>
			
				<g:if test="${userInstance?.dateNaissance}">
					<li class="fieldcontain">
						<span id="dateNaissance-label" class="property-label">
							<g:message code="user.dateNaissance.label" default="Date Naissance" />
						</span>
						<span class="property-value" aria-labelledby="dateNaissance-label">
							<g:formatDate date="${userInstance?.dateNaissance}" format="dd MMMM yyyy"/>
						</span>
					</li>
				</g:if>
				<g:if test="${userInstance?.vote}">
				<li class="fieldcontain">
					<span id="vote-label" class="property-label"><g:message code="user.vote.label" default="Vote" /></span>
					<span class="property-value" aria-labelledby="vote-label"><g:fieldValue bean="${userInstance}" field="vote"/></span>
				</li>
				</g:if>
			
				<%--<g:if test="${userInstance?.accountExpired}">
				<li class="fieldcontain">
					<span id="accountExpired-label" class="property-label"><g:message code="user.accountExpired.label" default="Account Expired" /></span>
					
						<span class="property-value" aria-labelledby="accountExpired-label"><g:formatBoolean boolean="${userInstance?.accountExpired}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${userInstance?.accountLocked}">
				<li class="fieldcontain">
					<span id="accountLocked-label" class="property-label"><g:message code="user.accountLocked.label" default="Account Locked" /></span>
					
						<span class="property-value" aria-labelledby="accountLocked-label"><g:formatBoolean boolean="${userInstance?.accountLocked}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${userInstance?.bio}">
				<li class="fieldcontain">
					<span id="bio-label" class="property-label"><g:message code="user.bio.label" default="Bio" /></span>
					
						<span class="property-value" aria-labelledby="bio-label"><g:fieldValue bean="${userInstance}" field="bio"/></span>
					
				</li>
				</g:if>--%>
				
				<g:if test="${userInstance?.centreInteret}">
				<li class="fieldcontain">
					<span id="centreInteret-label" class="property-label"><g:message code="user.centreInteret.label" default="Centre Interet" /></span>
					
						<g:each in="${userInstance.centreInteret}" var="c">
						<span class="property-value" aria-labelledby="centreInteret-label"><g:link controller="activite" action="show" id="${c.id}">${c?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<%--<g:if test="${userInstance?.enabled}">
				<li class="fieldcontain">
					<span id="enabled-label" class="property-label"><g:message code="user.enabled.label" default="Enabled" /></span>
					
						<span class="property-value" aria-labelledby="enabled-label"><g:formatBoolean boolean="${userInstance?.enabled}" /></span>
					
				</li>
				</g:if>
			
				<g:if test="${userInstance?.passwordExpired}">
				<li class="fieldcontain">
					<span id="passwordExpired-label" class="property-label"><g:message code="user.passwordExpired.label" default="Password Expired" /></span>
					
						<span class="property-value" aria-labelledby="passwordExpired-label"><g:formatBoolean boolean="${userInstance?.passwordExpired}" /></span>
					
				</li>
				</g:if>--%>
				
				<g:if test="${userInstance?.relations}">
				<li class="fieldcontain">
					<span id="relations-label" class="property-label"><g:message code="user.relations.label" default="Relations" /></span>
					
						<g:each in="${userInstance.relations}" var="r">
						<span class="property-value" aria-labelledby="relations-label"><g:link controller="relationship" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${userInstance?.relationsSubscriptions}">
				<li class="fieldcontain">
					<span id="relationsSubscriptions-label" class="property-label"><g:message code="user.relationsSubscriptions.label" default="Relations Subscriptions" /></span>
					
						<g:each in="${userInstance.relationsSubscriptions}" var="r">
						<span class="property-value" aria-labelledby="relationsSubscriptions-label"><g:link controller="relationship" action="show" id="${r.id}">${r?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
				<g:if test="${userInstance?.userTag}">
				<li class="fieldcontain">
					<span id="userTag-label" class="property-label"><g:message code="user.userTag.label" default="User Tag" /></span>
					
						<g:each in="${userInstance.userTag}" var="u">
						<span class="property-value" aria-labelledby="userTag-label"><g:link controller="photoTaggee" action="show" id="${u.id}">${u?.encodeAsHTML()}</g:link></span>
						</g:each>
					
				</li>
				</g:if>
			
			</ol>
		</div>
		<div class="clear"> 
		</div>
		<div id="show-user" align="left" class="content scaffold-show" role="main">
			<g:form>
				<fieldset class="buttons">
					<g:hiddenField name="id" value="${userInstance?.id}" />
					<g:link class="edit" action="edit" id="${userInstance?.id}"><g:message code="default.button.edit.label" default="Edit" /></g:link>
					<g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
				</fieldset>
			</g:form>
		</div>
	</body>
</html>
